<!doctype html>
<html class="theme-next   use-motion ">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />












  <link href="/vendors/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css"/>




  
    <link href='//fonts.lug.ustc.edu.cn/css?family=Lato:300,400,700,400italic&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
  



<link href="/vendors/font-awesome/css/font-awesome.min.css?v=4.4.0" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=0.4.5.2" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Android,Android-Studio," />





  <link rel="alternate" href="/atom.xml" title="黎稀" type="application/atom+xml" />




  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=0.4.5.2" />






<meta name="description" content="最后编辑时间： 2015-10-10 13:25开始学习史丢丢，在此祭奠即将逝去的Eclipse。我相信安装，环境搭建没啥好记的，so，在此挑一些自己觉得有用的，以免忘记

史丢丢结构
项目文件夹外结构


文件（夹）名
用途




.gradle
Gradle编译系统，版本由wrapper指定


.idea
Android Studio IDE所需要的文件


build
代码编译后生成的文">
<meta property="og:type" content="article">
<meta property="og:title" content="史丢丢笔记">
<meta property="og:url" content="http://lixicode.com/android/android-studio/index.html">
<meta property="og:site_name" content="黎稀">
<meta property="og:description" content="最后编辑时间： 2015-10-10 13:25开始学习史丢丢，在此祭奠即将逝去的Eclipse。我相信安装，环境搭建没啥好记的，so，在此挑一些自己觉得有用的，以免忘记

史丢丢结构
项目文件夹外结构


文件（夹）名
用途




.gradle
Gradle编译系统，版本由wrapper指定


.idea
Android Studio IDE所需要的文件


build
代码编译后生成的文">
<meta property="og:updated_time" content="2015-10-10T05:26:11.119Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="史丢丢笔记">
<meta name="twitter:description" content="最后编辑时间： 2015-10-10 13:25开始学习史丢丢，在此祭奠即将逝去的Eclipse。我相信安装，环境搭建没啥好记的，so，在此挑一些自己觉得有用的，以免忘记

史丢丢结构
项目文件夹外结构


文件（夹）名
用途




.gradle
Gradle编译系统，版本由wrapper指定


.idea
Android Studio IDE所需要的文件


build
代码编译后生成的文">



<script type="text/javascript" id="hexo.configuration">
  var CONFIG = {
    scheme: 'Mist',
    sidebar: 'post',
    motion: true
  };
</script>

  <title> 史丢丢笔记 | 黎稀 </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  <!--[if lte IE 8]>
  <div style=' clear: both; height: 59px; padding:0 0 0 15px; position: relative;margin:0 auto;'>
    <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode">
      <img src="http://7u2nvr.com1.z0.glb.clouddn.com/picouterie.jpg" border="0" height="42" width="820"
           alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today or use other browser ,like chrome firefox safari."
           style='margin-left:auto;margin-right:auto;display: block;'/>
    </a>
  </div>
<![endif]-->
  



  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "//hm.baidu.com/hm.js?c76cdc9b7b93baaf7d2ada3220916af8";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>




  <div class="container one-column page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-meta ">
  

  <div class="custom-logo-site-title">
    <a href="/"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">黎稀</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
  <p class="site-subtitle"></p>
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu menu-left">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-home fa-fw"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-archive fa-fw"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-tags fa-fw"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about" rel="section">
            
              <i class="menu-item-icon fa fa-user fa-fw"></i> <br />
            
            关于
          </a>
        </li>
      

      
      
    </ul>
  

  
    <div class="site-search">
      
  
  <form class="site-search-form">
    <input type="text" id="st-search-input" class="st-search-input st-default-search-input" />
  </form>


<script type="text/javascript">
  (function(w,d,t,u,n,s,e){w['SwiftypeObject']=n;w[n]=w[n]||function(){
    (w[n].q=w[n].q||[]).push(arguments);};s=d.createElement(t);
    e=d.getElementsByTagName(t)[0];s.async=1;s.src=u;e.parentNode.insertBefore(s,e);
  })(window,document,'script','//s.swiftypecdn.com/install/v2/st.js','_st');

  _st('install', 'h_1LpcE4jz_K3ErpxpDg','2.0.0');
</script>



    </div>
  
</nav>

 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div id="content" class="content">
          

  <div id="posts" class="posts-expand">
    

  
  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                史丢丢笔记
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            发表于
            <time itemprop="dateCreated" datetime="2015-09-24T16:12:06+08:00" content="2015-09-24">
              2015-09-24
            </time>
          </span>

          

          
            
              <span class="post-comments-count">
              &nbsp; | &nbsp;
              <a href="/android/android-studio/#comments" itemprop="discussionUrl">
                <span class="post-comments-count disqus-comment-count" data-disqus-identifier="android/android-studio/" itemprop="commentsCount"></span>
              </a>
            </span>
            
          

          

        </div>
      </header>
    


    <div class="post-body">

      
      

      
        <span itemprop="articleBody"><blockquote>
<p>最后编辑时间： 2015-10-10 13:25<br>开始学习史丢丢，在此祭奠即将逝去的Eclipse。我相信安装，环境搭建没啥好记的，so，在此挑一些自己觉得有用的，以免忘记</p>
</blockquote>
<h1 id="史丢丢结构">史丢丢结构</h1><blockquote>
<h2 id="项目文件夹外结构">项目文件夹外结构</h2><table>
<thead>
<tr>
<th>文件（夹）名</th>
<th>用途</th>
</tr>
</thead>
<tbody>
<tr>
<td>.gradle</td>
<td>Gradle编译系统，版本由wrapper指定</td>
</tr>
<tr>
<td>.idea</td>
<td>Android Studio IDE所需要的文件</td>
</tr>
<tr>
<td>build</td>
<td>代码编译后生成的文件存放的位置</td>
</tr>
<tr>
<td>gradle</td>
<td>wrapper的jar和配置文件所在的位置</td>
</tr>
<tr>
<td>.gitignore</td>
<td>git使用的ignore文件</td>
</tr>
<tr>
<td>build.gradle</td>
<td>gradle编译的相关配置文件（相当于Makefile）</td>
</tr>
<tr>
<td>gradle.properties</td>
<td>gradle相关的全局属性设置</td>
</tr>
<tr>
<td>gradlew</td>
<td>*nix下的gradle wrapper可执行文件</td>
</tr>
<tr>
<td>graldew.bat</td>
<td>windows下的gradle wrapper可执行文件</td>
</tr>
<tr>
<td>local.properties</td>
<td>本地属性设置（key设置，android sdk位置等属性），这个文件是不推荐上传到VCS中去的</td>
</tr>
<tr>
<td>settings.gradle</td>
<td>和设置相关的gradle脚本</td>
</tr>
</tbody>
</table>
<h2 id="项目文件内结构">项目文件内结构</h2><table>
<thead>
<tr>
<th>文件（夹）名</th>
<th>用途</th>
</tr>
</thead>
<tbody>
<tr>
<td>build</td>
<td>编译后的文件存在的位置（包括最终生成的apk也在这里面）</td>
</tr>
<tr>
<td>libs</td>
<td>依赖的库所在的位置（jar和aar)</td>
</tr>
<tr>
<td>src</td>
<td>源代码所在的目录</td>
</tr>
<tr>
<td>src/main</td>
<td>主要代码所在位置（src/androidTest)就是测试代码所在位置了</td>
</tr>
<tr>
<td>src/main/assets</td>
<td>android中附带的一些文件</td>
</tr>
<tr>
<td>src/main/java</td>
<td>最最重要的，我们的java代码所在的位置</td>
</tr>
<tr>
<td>src/main/jniLibs</td>
<td>jni的一些动态库所在的默认位置(.so文件)</td>
</tr>
<tr>
<td>src/main/res</td>
<td>android资源文件所在位置</td>
</tr>
<tr>
<td>src/main/AndroidManifest.xml</td>
<td>AndroidManifest不用介绍了吧~</td>
</tr>
<tr>
<td>build.gradle</td>
<td>和这个项目有关的gradle配置，相当于这个项目的Makefile，一些项目的依赖就写在这里面</td>
</tr>
<tr>
<td>proguard.pro</td>
<td>代码混淆配置文件</td>
</tr>
</tbody>
</table>
</blockquote>
<h1 id="Library">Library</h1><p>对于一个CP手来说，LIB是必不可少的，但是应该怎么来导入LIB呢？</p>
<blockquote>
<p>同目录同Project<br><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="function">compile <span class="title">project</span><span class="params">(<span class="string">':lib'</span>)</span></span></span><br></pre></td></tr></table></figure></p>
<p>同目录不同Project<br><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">settings.gradle中include <span class="string">':LibProject:lib'</span></span><br><span class="line">并在build.gradle中添加 <span class="function">compile <span class="title">project</span><span class="params">(<span class="string">':LibProject:lib'</span>)</span></span></span><br></pre></td></tr></table></figure></p>
<p>不同目录的Project</p>
<blockquote>
<p>目录结构如下</p>
<ul>
<li>Library<ul>
<li>Push</li>
<li>FeedBack</li>
</ul>
</li>
<li>App<ul>
<li>App<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">settings.gradle中include <span class="string">'../Library:Push'</span></span><br><span class="line"><span class="function">compile <span class="title">project</span><span class="params">(<span class="string">'../Library:Push'</span>)</span></span></span><br></pre></td></tr></table></figure>
</li>
</ul>
</li>
</ul>
</blockquote>
</blockquote>
<h1 id="好用的插件">好用的插件</h1><ul>
<li>CodeGlance<br>快速定位代码</li>
<li>JsonOnlineViewer (感觉还是用PostMan+Fiddler更爽快些)<br>调试接口数据，可以选择请求类型，自定义请求头及请求体，json格式化</li>
<li>Android Postfix Completion<br>根据后缀快速完成代码</li>
</ul>
<h1 id="参考">参考</h1><p>1.项目结构参考 <a href="http://segmentfault.com/a/1190000002963895" target="_blank" rel="external">segmentfault:Android Studio目录结构浅析</a></p>
</span>
      
    </div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Android/" rel="tag">#Android</a>
          
            <a href="/tags/Android-Studio/" rel="tag">#Android-Studio</a>
          
        </div>
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
          </div>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/android/android-adapter/" rel="prev" title="回炉重造的BaseAdapter3.0">
                回炉重造的BaseAdapter3.0 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>


        </div>

        


        
  <div class="comments" id="comments">
    
      <div id="disqus_thread">
        <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
      </div>
    
  </div>


      </div>

      
        
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel ">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" src="http://tp2.sinaimg.cn/1806625505/180/40077142424/1" alt="黎稀" itemprop="image"/>
          <p class="site-author-name" itemprop="name">黎稀</p>
        </div>
        <p class="site-description motion-element" itemprop="description"></p>
        <nav class="site-state motion-element">
          <div class="site-state-item site-state-posts">
            <a href="/archives">
              <span class="site-state-item-count">2</span>
              <span class="site-state-item-name">日志</span>
            </a>
          </div>

          <div class="site-state-item site-state-categories">
            
              <span class="site-state-item-count">0</span>
              <span class="site-state-item-name">分类</span>
              
          </div>

          <div class="site-state-item site-state-tags">
            <a href="/tags">
              <span class="site-state-item-count">3</span>
              <span class="site-state-item-name">标签</span>
              </a>
          </div>

        </nav>

        
          <div class="feed-link motion-element">
            <a href="/atom.xml" rel="alternate">
              <i class="fa fa-rss"></i>
              RSS
            </a>
          </div>
        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="http://weibo.com/rainy0912" target="_blank">
                  
                    <i class="fa fa-weibo"></i> Weibo
                  
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://github.com/lixi0912" target="_blank">
                  
                    <i class="fa fa-github"></i> GitHub
                  
                </a>
              </span>
            
          
        </div>

        
        
          <div class="cc-license motion-element" itemprop="license">
            <a href="http://creativecommons.org/licenses/by-sa/4.0" class="cc-opacity" target="_blank">
              <img src="/images/cc-by-sa.svg" alt="Creative Commons" />
            </a>
          </div>
        

        <div class="links-of-author motion-element">
          
        </div>

      </section>

      
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc-indicator-top post-toc-indicator">
            <i class="fa fa-angle-double-up"></i>
          </div>
          <div class="post-toc">
            
              
            
            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#史丢丢结构"><span class="nav-number">1.</span> <span class="nav-text">史丢丢结构</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#项目文件夹外结构"><span class="nav-number">1.1.</span> <span class="nav-text">项目文件夹外结构</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#项目文件内结构"><span class="nav-number">1.2.</span> <span class="nav-text">项目文件内结构</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Library"><span class="nav-number">2.</span> <span class="nav-text">Library</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#好用的插件"><span class="nav-number">3.</span> <span class="nav-text">好用的插件</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#参考"><span class="nav-number">4.</span> <span class="nav-text">参考</span></a></li></ol></div>
            
          </div>
          <div class="post-toc-indicator-bottom post-toc-indicator">
            <i class="fa fa-angle-double-down"></i>
          </div>
        </section>
      

    </div>
  </aside>


      
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2015</span>
  <span class="with-love">
    <i class="icon-next-heart fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">黎稀</span>
</div>

<div class="powered-by">
  由 <a class="theme-link" href="http://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Mist
  </a>
</div>



      </div>
    </footer>

    <div class="back-to-top"></div>
  </div>

  <script type="text/javascript" src="/vendors/jquery/index.js?v=2.1.3"></script>

  
  

  
    
    

  

    <script type="text/javascript">
      var disqus_shortname = 'lixicode';
      var disqus_identifier = 'android/android-studio/';
      var disqus_title = '史丢丢笔记';
      var disqus_url = 'http://lixicode.com/android/android-studio/';

      function run_disqus_script(disqus_script){
        var dsq = document.createElement('script');
        dsq.type = 'text/javascript';
        dsq.async = true;
        dsq.src = '//' + disqus_shortname + '.disqus.com/' + disqus_script;
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
      }

      run_disqus_script('count.js');
      
        run_disqus_script('embed.js');
      
    </script>
  


  

  
  <script type="text/javascript" src="/vendors/fancybox/source/jquery.fancybox.pack.js"></script>
  <script type="text/javascript" src="/js/fancy-box.js?v=0.4.5.2"></script>


  <script type="text/javascript" src="/js/helpers.js?v=0.4.5.2"></script>
  <script type="text/javascript" src="/vendors/velocity/velocity.min.js"></script>
<script type="text/javascript" src="/vendors/velocity/velocity.ui.min.js"></script>

<script type="text/javascript" src="/js/motion.js?v=0.4.5.2" id="motion.global"></script>


  <script type="text/javascript" src="/vendors/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  <script type="text/javascript" src="/vendors/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  
<script type="text/javascript" src="/js/bootstrap.scrollspy.js?v=0.4.5.2" id="bootstrap.scrollspy.custom"></script>


<script type="text/javascript" id="sidebar.toc.highlight">
  $(document).ready(function () {
    var tocSelector = '.post-toc';
    var $tocSelector = $(tocSelector);
    var activeCurrentSelector = '.active-current';

    $tocSelector
      .on('activate.bs.scrollspy', function () {
        var $currentActiveElement = $(tocSelector + ' .active').last();

        removeCurrentActiveClass();
        $currentActiveElement.addClass('active-current');

        $tocSelector[0].scrollTop = $currentActiveElement.position().top;
      })
      .on('clear.bs.scrollspy', function () {
        removeCurrentActiveClass();
      });

    function removeCurrentActiveClass () {
      $(tocSelector + ' ' + activeCurrentSelector)
        .removeClass(activeCurrentSelector.substring(1));
    }

    function processTOC () {
      getTOCMaxHeight();
      toggleTOCOverflowIndicators();
    }

    function getTOCMaxHeight () {
      var height = $('.sidebar').height() -
                   $tocSelector.position().top -
                   $('.post-toc-indicator-bottom').height();

      $tocSelector.css('height', height);

      return height;
    }

    function toggleTOCOverflowIndicators () {
      tocOverflowIndicator(
        '.post-toc-indicator-top',
        $tocSelector.scrollTop() > 0 ? 'show' : 'hide'
      );

      tocOverflowIndicator(
        '.post-toc-indicator-bottom',
        $tocSelector.scrollTop() >= $tocSelector.find('ol').height() - $tocSelector.height() ? 'hide' : 'show'
      )
    }

    $(document).on('sidebar.motion.complete', function () {
      processTOC();
    });

    $('body').scrollspy({ target: tocSelector });
    $(window).on('resize', function () {
      if ( $('.sidebar').hasClass('sidebar-active') ) {
        processTOC();
      }
    });

    onScroll($tocSelector);

    function onScroll (element) {
      element.on('mousewheel DOMMouseScroll', function (event) {
          var oe = event.originalEvent;
          var delta = oe.wheelDelta || -oe.detail;

          this.scrollTop += ( delta < 0 ? 1 : -1 ) * 30;
          event.preventDefault();

          toggleTOCOverflowIndicators();
      });
    }

    function tocOverflowIndicator (indicator, action) {
      var $indicator = $(indicator);
      var opacity = action === 'show' ? 1 : 0;
      $indicator.velocity ?
        $indicator.velocity('stop').velocity({
          opacity: opacity
        }, { duration: 100 }) :
        $indicator.stop().animate({
          opacity: opacity
        }, 100);
    }

  });
</script>

<script type="text/javascript" id="sidebar.nav">
  $(document).ready(function () {
    var html = $('html');
    var TAB_ANIMATE_DURATION = 200;
    var hasVelocity = $.isFunction(html.velocity);

    $('.sidebar-nav li').on('click', function () {
      var item = $(this);
      var activeTabClassName = 'sidebar-nav-active';
      var activePanelClassName = 'sidebar-panel-active';
      if (item.hasClass(activeTabClassName)) {
        return;
      }

      var currentTarget = $('.' + activePanelClassName);
      var target = $('.' + item.data('target'));

      hasVelocity ?
        currentTarget.velocity('transition.slideUpOut', TAB_ANIMATE_DURATION, function () {
          target
            .velocity('stop')
            .velocity('transition.slideDownIn', TAB_ANIMATE_DURATION)
            .addClass(activePanelClassName);
        }) :
        currentTarget.animate({ opacity: 0 }, TAB_ANIMATE_DURATION, function () {
          currentTarget.hide();
          target
            .stop()
            .css({'opacity': 0, 'display': 'block'})
            .animate({ opacity: 1 }, TAB_ANIMATE_DURATION, function () {
              currentTarget.removeClass(activePanelClassName);
              target.addClass(activePanelClassName);
            });
        });

      item.siblings().removeClass(activeTabClassName);
      item.addClass(activeTabClassName);
    });

    $('.post-toc a').on('click', function (e) {
      e.preventDefault();
      var targetSelector = escapeSelector(this.getAttribute('href'));
      var offset = $(targetSelector).offset().top;
      hasVelocity ?
        html.velocity('stop').velocity('scroll', {
          offset: offset  + 'px',
          mobileHA: false
        }) :
        $('html, body').stop().animate({
          scrollTop: offset
        }, 500);
    });

    // Expand sidebar on post detail page by default, when post has a toc.
    motionMiddleWares.sidebar = function () {
      var $tocContent = $('.post-toc-content');
      if (CONFIG.sidebar === 'post') {
        if ($tocContent.length > 0 && $tocContent.html().trim().length > 0) {
          displaySidebar();
        }
      }
    };
  });
</script>



  <script type="text/javascript" src="/js/bootstrap.js"></script>

  
  
  <script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {
        inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
        processEscapes: true,
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
    });
  </script>

  <script type="text/x-mathjax-config">
    MathJax.Hub.Queue(function() {
      var all = MathJax.Hub.getAllJax(), i;
      for (i=0; i < all.length; i += 1) {
        all[i].SourceElement().parentNode.className += ' has-jax';
      }
    });
  </script>

  
    <script type="text/javascript" src="http://cdn.staticfile.org/mathjax/2.4.0/MathJax.js"></script>
    <script type="text/javascript" src="http://cdn.staticfile.org/mathjax/2.4.0/config/TeX-AMS-MML_HTMLorMML.js"></script>
  


  
  

</body>
</html>
